<?php

namespace app\common\model;


class WeixinMenu extends TimeModel
{

    protected $name = "weixin_menu";

    protected $deleteTime = "delete_time";


    public function getStatusList()
    {
        return ['0' => '禁用', '1' => '正常',];
    }

    public function getPidMenuList()
    {
        $arr = $this->field('id,pid,title')->where('pid', 0)->select()->toArray();
        return array_merge([[
            'id' => 0,
            'pid' => 0,
            'title' => '顶级菜单'
        ]], $arr);
    }
}